<?php

namespace SisGG\FinalBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use SisGG\FinalBundle\Form\DireccionType;
use SisGG\FinalBundle\Form\CuitType;
use SisGG\FinalBundle\Form\TelefonoType;

class ProveedorType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('razonSocial')
            ->add('email', 'email')
            ->add('nroBco', null, array(
                'invalid_message' => 'Debe ingresar los números que corresponan al CNB.',
               
                ))
            ->add('direccion', new DireccionType ())
            ->add('tel1', new TelefonoType())
            ->add('tel2', new TelefonoType())
            ->add('cuit', new CuitType ())
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'SisGG\FinalBundle\Entity\Proveedor'
        ));
    }

    public function getName()
    {
        return 'sisgg_finalbundle_proveedortype';
    }
}
